import 'package:flutter/material.dart';
import 'package:flutter_shop/pages/base/i_contract.dart';

///Title:BasePresenter <br/>
///Description: <br/>
///author:xiemiao <br/>
///date: 2020-03-05 <br/>
///version 1.0 <br/>
class BasePresenter<V extends IView> implements IPresenter {
  V mView;

  BuildContext get mContext => mView.getContext();

  @override
  void initState() {}

  @override
  void buildComplete() {}

  @override
  void didChangeDependencies() {}

  @override
  void didUpdateWidget(oldWidget) {}

  @override
  void deactivate() {}

  @override
  void dispose() {}

  ///更新widget
  void updateStateWidget() {
    mView.updateStateWidget();
  }
}
